$OpenBSD: patch-Makefile,v 1.1.1.1 2011/06/13 20:33:19 kili Exp $
--- Makefile.orig	Thu Jun  9 06:06:22 2011
+++ Makefile	Sun Jun 12 17:19:04 2011
@@ -1,4 +1,3 @@
-PREFIX=/usr
 DATADIR=${PREFIX}/share/wordwarvi
 MANDIR?=${PREFIX}/share/man
 MANPAGEDIR=${MANDIR}/man6
@@ -53,24 +52,24 @@ else
 endif
 
 joystick.o:	joystick.c joystick.h Makefile
-	$(CC) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} -pthread -Wall -c joystick.c
+	$(CC) $(CFLAGS) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} -pthread -Wall -c joystick.c
 
 ogg_to_pcm.o:	ogg_to_pcm.c ogg_to_pcm.h Makefile
-	$(CC) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
+	$(CC) $(CFLAGS) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
 		-pthread -Wall -c ogg_to_pcm.c
 
 wwviaudio.o:	wwviaudio.c wwviaudio.h ogg_to_pcm.h my_point.h Makefile
-	$(CC) -Wall ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} \
+	$(CC) $(CFLAGS) -Wall ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} \
 		${DEFINES} \
 		-pthread `pkg-config --cflags vorbisfile` \
 		-c wwviaudio.c
 
 rumble.o:	rumble.c rumble.h Makefile
-	$(CC) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
+	$(CC) $(CFLAGS) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} `pkg-config --cflags vorbisfile` \
 		-pthread -Wall -c rumble.c
 
 wwvi_font.o:	wwvi_font.c wwvi_font.h my_point.h Makefile
-	$(CC) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} -pthread -Wall -c wwvi_font.c
+	$(CC) $(CFLAGS) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} -pthread -Wall -c wwvi_font.c
 
 stamp:	stamp.c
 	$(BUILD_CC) -o stamp stamp.c
@@ -78,7 +77,7 @@ stamp:	stamp.c
 wordwarvi:	wordwarvi.c joystick.o rumble.o ${OGGOBJ} wwviaudio.o wwvi_font.o \
 		Makefile version.h stamp levels.h rumble.h
 	./stamp > stamp.h
-	$(CC) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} ${SCREENSAVERFLAG} -pthread -Wall  ${DEFINES} \
+	$(CC) $(CFLAGS) ${DEBUG} ${PROFILE_FLAG} ${OPTIMIZE_FLAG} ${SCREENSAVERFLAG} -pthread -Wall  ${DEFINES} \
 		joystick.o \
 		rumble.o \
 		wwvi_font.o \
